import request from "@/utils/request";

export default {
  login(data) {
    return request({
      url: "/login",
      method: "post",
      data,
    });
  },
  sendCode(email){
    return request({
        url: "/email",
        method:"get",
        params:{
            email:email
        }
    })
  },
  resetPassword(data){
    return request({
        url:"/users/forget",
        method:"post",
        data
    })
  },
  createUser(data){
    return request({
        url:"/users",
        method:"post",
        data
    })
  },
  getUserRole(){
    return request({
        url:"/userRole",
        method:"get"
    })
  },
};
